#include "food.h"
#include<ctime>
#include<QPixmap>
food::food(QWidget *parent) : QWidget(parent)
{
    creatfood();

}

void food::creatfood()
{
    srand((unsigned)time(NULL));
    food_x=(rand()%24)*25;
    food_y=(rand()%24)*25;
}
int food::getfoodx()
{
    return food_x;
}
int food::getfoody()
{
    return food_y;
}
